<?php 
	CLASS Action extends Smartyview{
		
		private $var = array();
			public function __call($var,$arg){
				header('Content-type:text/html;charset=utf-8');
		echo "<script>location.href='./index.php'</script>";
	}
	protected function success($msg,$url){
		header('Content-type:text/html;charset=utf-8');
		echo "<script>alert('$msg');location.href='$url'</script>";
		die;
	}

	protected function error($msg){
		header('Content-type:text/html;charset=utf-8');
		echo "<script>alert('$msg');window.history.back()</script>";
		die;
	}
	// /**
	//  * [display 根据控制器名称找到文件夹，然后再根据方法名找到相对应名称的模版文件]
	//  * @param  [type] $tpl [description]
	//  * @return [type]      [description]
	//  */
	// protected function display($tpl = NULL){
	// 	extract($this->var);

	// 	if ($tpl == NULL) {
	// 		$path =  APP_TPL_PATH .'/'.CONTROL.'/'.METHOD.'.html';	
	// 	}else{
	// 		//获得后缀
	// 		$type = ltrim(strrchr($tpl, '.'),'.');
	// 		//如果后缀为空 默认为.html后缀
	// 		if(empty($type)) $tpl .= '.html';
	// 		$path = APP_TPL_PATH . '/' . CONTROL . '/' . $tpl;
	// 	}
	// 	include $path;

	// }
	// //分配
	// protected function assign($var,$value){
	// 	$this->var[$var] = $value;

	// }

	// public function __set($var,$value){
	// 	$this->var[$var] = $value;
	// }

	}




 ?>